<?php
//Ten file muon xuat ra de in
/*$v_recordtype_filter = $_SESSION['onegate_current_recordtype'];
if(isset($_REQUEST['hdn_recordtype_filter'])){
	$v_recordtype_filter = $_REQUEST['hdn_recordtype_filter'];
} */
$v_recordtype_filter = $arr_single_record[FK_RECORDTYPE];

$v_file_name = "phieu_chuyen.htm";
$v_xml_str = $arr_single_record['C_RECEIVED_RECORD_XML_DATA'];
//file chua cac the can thay the
$v_receipt_xml_file = "../../xml/".$v_recordtype_filter."/mau_in_phieu_kiem_soat.xml";
$v_receipt_richtext_file = "../../template/".$v_recordtype_filter."/mau_phieu_kiem_soat.htm";
if (!file_exists($v_receipt_richtext_file)) {
	$v_receipt_richtext_file = "../../template/mau_phieu_kiem_soat.htm";
}
if (file_exists($v_receipt_xml_file)){
	$v_receipt_xml_string = _read_file($v_receipt_xml_file);
}else{
	$v_receipt_xml_file = "../../xml/other/mau_in_phieu_kiem_soat.xml";
	$v_receipt_xml_string = _read_file($v_receipt_xml_file);
}
$v_receipt_richtext_string = _read_file($v_receipt_richtext_file);
echo $v_richtext_output = Print_Receipt_From_XML($v_receipt_xml_string,$v_receipt_richtext_string,$v_xml_str,$arr_single_record);
//_write_file($v_file_name,$v_richtext_output);
?>
<!-- script language="javascript">
	window.location = "<?php echo $v_file_name;?>";
	//window.location.reload(0);
</script -->